package com.woniuxy.controller;

import com.woniuxy.entity.ResponseEntity;
import com.woniuxy.service.RbacMenuService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author: 马宇航
 * @Todo: 该接口用于查询权限菜单信息
 * @DateTime: 22/04/18/0018 上午 10:29
 * @Component: 成都蜗牛学苑
 **/
@RestController
@RequestMapping("/rbacMenu")
public class RbacMenuController {
    @Autowired
    RbacMenuService rbacMenuService;

    @RequestMapping("/findAll")
    public ResponseEntity findAll(){
     return   rbacMenuService.findAll();
    }
    @RequestMapping("/findByRoleId/{roleId}")
    public ResponseEntity findByRoleId(@PathVariable int roleId){
        return   rbacMenuService.findByRoleId(roleId);
    }
}
